package com.kokos.backingbeans;

import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;

import org.apache.log4j.Logger;

@ManagedBean(name = "logout")
public class LogoutBean {

	private final Logger LOGGER = Logger.getLogger(getClass().getName());
	
	public String logout() {
		FacesContext.getCurrentInstance().getExternalContext()
				.invalidateSession();
		LOGGER.info("Log out...");
		return "index?faces-redirect=true";
	}
}
